Option Strict Off
Option Explicit On
Module cards
	
	' card properties
	Public num_all_actions As Short
	Public costs(100) As Short
	Public original_costs(100) As Short
	Public victory_points(100) As Short
	Public gold(100) As Short
	Public potions(100) As Short
	Public names(100) As String
	Public is_action(100) As Short
	Public is_duration(100) As Short
	Public extra_actions(100) As Short
	Public never_buy(100) As Short
	Public not_coded(100) As Short
	Public is_attack(100) As Short
	Public is_reaction(100) As Short
	Public images(100) As System.Drawing.Image
	
	
	'UPGRADE_NOTE: str was upgraded to str_Renamed. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
    Public Function get_id_by_name(ByVal str_Renamed As String) As Object
        Dim i As Short
        For i = 0 To 6 + num_all_actions
            If names(i) = str_Renamed Then
                'UPGRADE_WARNING: Couldn't resolve default property of object get_id_by_name. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                get_id_by_name = i
                Exit Function
            End If
        Next i
        'UPGRADE_WARNING: Couldn't resolve default property of object get_id_by_name. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
        get_id_by_name = -1
    End Function
	
	Public Sub initialize_cards()
		Dim i As Short
		'UPGRADE_NOTE: str was upgraded to str_Renamed. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
		Dim str_Renamed As String
		num_all_actions = 89
		
		'UPGRADE_WARNING: Dir has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
		If Dir(My.Application.Info.DirectoryPath & "/campaign.txt") <> "" Then
			FileOpen(1, My.Application.Info.DirectoryPath & "/campaign.txt", OpenMode.Input)
			Input(1, str_Renamed)
			If str_Renamed = "alldone" Then
				num_all_actions = num_all_actions + 1
			End If
			FileClose(1)
		End If
		
		names(0) = "Copper"
		costs(0) = 0
		gold(0) = 1
		
		names(1) = "Silver"
		costs(1) = 3
		gold(1) = 2
		
		names(2) = "Gold"
		costs(2) = 6
		gold(2) = 3
		
		names(3) = "Estate"
		costs(3) = 2
		victory_points(3) = 1
		
		names(4) = "Duchy"
		costs(4) = 5
		victory_points(4) = 3
		
		names(5) = "Province"
		costs(5) = 8
		victory_points(5) = 6
		
		names(6) = "Curse"
		costs(6) = 0
		victory_points(6) = -1
		never_buy(6) = 1
		
		names(7) = "Adventurer"
		costs(7) = 6
		is_action(7) = 1
		never_buy(7) = 1
		
		names(8) = "Library"
		costs(8) = 5
		is_action(8) = 1
		
		names(9) = "Bureaucrat"
		costs(9) = 4
		is_action(9) = 1
		is_attack(9) = 1
		
		names(10) = "Moat"
		costs(10) = 2
		is_action(10) = 1
		is_reaction(10) = 1
		
		names(11) = "Thief"
		costs(11) = 4
		is_action(11) = 1
		is_attack(11) = 1
		
		names(12) = "Village"
		costs(12) = 3
		is_action(12) = 1
		extra_actions(12) = 1
		
		names(13) = "Feast"
		costs(13) = 4
		is_action(13) = 1
		
		names(14) = "Gardens"
		costs(14) = 4
		victory_points(14) = 9
		
		names(15) = "Moneylender"
		costs(15) = 4
		is_action(15) = 1
		never_buy(15) = 1
		
		names(16) = "Witch"
		costs(16) = 5
		is_action(16) = 1
		is_attack(16) = 1
		
		names(17) = "Woodcutter"
		costs(17) = 3
		is_action(17) = 1
		never_buy(17) = 1
		
		names(18) = "Festival"
		costs(18) = 5
		is_action(18) = 1
		extra_actions(18) = 1
		
		names(19) = "Chancellor"
		costs(19) = 3
		is_action(19) = 1
		never_buy(19) = 1
		
		names(20) = "Chapel"
		costs(20) = 2
		is_action(20) = 1
		never_buy(20) = 1
		
		names(21) = "Cellar"
		costs(21) = 2
		is_action(21) = 1
		extra_actions(21) = 1
		
		names(22) = "Laboratory"
		costs(22) = 5
		is_action(22) = 1
		extra_actions(22) = 1
		
		names(23) = "Market"
		costs(23) = 5
		is_action(23) = 1
		extra_actions(23) = 1
		
		names(24) = "Militia"
		costs(24) = 4
		is_action(24) = 1
		is_attack(24) = 1
		
		names(25) = "Mine"
		costs(25) = 5
		is_action(25) = 1
		
		names(26) = "Council Room"
		costs(26) = 5
		is_action(26) = 1
		
		names(27) = "Smithy"
		costs(27) = 4
		is_action(27) = 1
		
		names(28) = "Spy"
		costs(28) = 4
		is_action(28) = 1
		extra_actions(28) = 1
		never_buy(28) = 1
		is_attack(28) = 1
		
		names(29) = "Throne Room"
		costs(29) = 4
		is_action(29) = 1
		
		names(30) = "Remodel"
		costs(30) = 4
		is_action(30) = 1
		never_buy(30) = 1
		
		names(31) = "Workshop"
		costs(31) = 3
		is_action(31) = 1
		
		'###############################################################
		' now start seasside
		'###############################################################
		
		names(32) = "Native Village"
		costs(32) = 2
		is_action(32) = 1
		extra_actions(32) = 1
		
		names(33) = "Embargo"
		costs(33) = 2
		is_action(33) = 1
		
		names(34) = "Pearl Diver"
		costs(34) = 2
		is_action(34) = 1
		extra_actions(34) = 1
		
		names(35) = "Haven"
		costs(35) = 2
		is_action(35) = 1
		extra_actions(35) = 1
		is_duration(35) = 1
		
		names(36) = "Lookout"
		costs(36) = 3
		is_action(36) = 1
		extra_actions(36) = 1
		never_buy(36) = 1
		
		names(37) = "Ambassador"
		costs(37) = 3
		is_action(37) = 1
		never_buy(37) = 1
		is_attack(37) = 1
		
		names(38) = "Warehouse"
		costs(38) = 3
		is_action(38) = 1
		extra_actions(38) = 1
		
		names(39) = "Bazaar"
		costs(39) = 5
		is_action(39) = 1
		extra_actions(39) = 1
		
		names(40) = "Caravan"
		costs(40) = 4
		is_action(40) = 1
		is_duration(40) = 1
		extra_actions(40) = 1
		
		names(41) = "Wharf"
		costs(41) = 5
		is_action(41) = 1
		is_duration(41) = 1
		
		names(42) = "Fishing Village"
		costs(42) = 3
		is_action(42) = 1
		is_duration(42) = 1
		extra_actions(42) = 1
		
		names(43) = "Smugglers"
		costs(43) = 3
		is_action(43) = 1
		
		names(44) = "Merchant Ship"
		costs(44) = 5
		is_action(44) = 1
		is_duration(44) = 1
		
		names(45) = "Lighthouse"
		costs(45) = 2
		is_action(45) = 1
		is_duration(45) = 1
		
		names(46) = "Cutpurse"
		costs(46) = 4
		is_action(46) = 1
		is_attack(46) = 1
		
		names(47) = "Navigator"
		costs(47) = 4
		is_action(47) = 1
		never_buy(47) = 1
		
		names(48) = "Salvager"
		costs(48) = 4
		is_action(48) = 1
		never_buy(48) = 1
		
		names(49) = "Pirate Ship"
		costs(49) = 4
		is_action(49) = 1
		is_attack(49) = 1
		
		names(50) = "Island"
		costs(50) = 4
		is_action(50) = 1
		victory_points(50) = 2
		
		names(51) = "Treasure Map"
		costs(51) = 4
		is_action(51) = 1
		never_buy(51) = 1
		
		names(52) = "Sea Hag"
		costs(52) = 4
		is_action(52) = 1
		is_attack(52) = 1
		
		names(53) = "Explorer"
		costs(53) = 5
		is_action(53) = 1
		
		names(54) = "Treasury"
		costs(54) = 5
		is_action(54) = 1
		extra_actions(54) = 1
		
		names(55) = "Ghost Ship"
		costs(55) = 5
		is_action(55) = 1
		is_attack(55) = 1
		
		names(56) = "Outpost"
		costs(56) = 5
		is_action(56) = 1
		is_duration(56) = 1
		
		names(57) = "Tactician"
		costs(57) = 5
		is_action(57) = 1
		is_duration(57) = 1
		
		'######################################################
		' intrigue cards
		'#########################################################
		
		names(58) = "Shanty Town"
		costs(58) = 3
		is_action(58) = 1
		
		names(59) = "Torturer"
		costs(59) = 5
		is_action(59) = 1
		is_attack(59) = 1
		
		names(60) = "Upgrade"
		costs(60) = 5
		is_action(60) = 1
		extra_actions(60) = 1
		never_buy(60) = 1
		
		names(61) = "Bridge"
		costs(61) = 4
		is_action(61) = 1
		never_buy(61) = 1
		
		names(62) = "Mining Village"
		costs(62) = 4
		is_action(62) = 1
		extra_actions(62) = 1
		
		names(63) = "Pawn"
		costs(63) = 2
		is_action(63) = 1
		
		names(64) = "Trading Post"
		costs(64) = 5
		is_action(64) = 1
		never_buy(64) = 1
		
		names(65) = "Duke"
		costs(65) = 5
		victory_points(65) = 99
		
		names(66) = "Minion"
		costs(66) = 5
		is_action(66) = 1
		extra_actions(66) = 1
		is_attack(66) = 1
		
		names(67) = "Courtyard"
		costs(67) = 2
		is_action(67) = 1
		
		names(68) = "Secret Chamber"
		costs(68) = 2
		is_action(68) = 1
		is_reaction(68) = 1
		
		names(69) = "Great Hall"
		costs(69) = 3
		is_action(69) = 1
		victory_points(69) = 1
		
		names(70) = "Harem"
		costs(70) = 6
		gold(70) = 2
		victory_points(70) = 2
		
		names(71) = "Masquerade"
		costs(71) = 3
		is_action(71) = 1
		never_buy(71) = 1
		
		names(72) = "Steward"
		costs(72) = 3
		is_action(72) = 1
		
		names(73) = "Swindler"
		costs(73) = 3
		is_action(73) = 1
		is_attack(73) = 1
		
		names(74) = "Wishing Well"
		costs(74) = 3
		is_action(74) = 1
		extra_actions(74) = 1
		
		names(75) = "Baron"
		costs(75) = 4
		is_action(75) = 1
		
		names(76) = "Conspirator"
		costs(76) = 4
		is_action(76) = 1
		never_buy(76) = 1
		
		names(77) = "Coppersmith"
		costs(77) = 4
		is_action(77) = 1
		never_buy(77) = 1
		
		names(78) = "Ironworks"
		costs(78) = 4
		is_action(78) = 1
		
		names(79) = "Scout"
		costs(79) = 4
		is_action(79) = 1
		extra_actions(79) = 1
		
		names(80) = "Saboteur"
		costs(80) = 5
		is_action(80) = 1
		is_attack(80) = 1
		
		names(81) = "Tribute"
		costs(81) = 5
		is_action(81) = 1
		
		names(82) = "Nobles"
		costs(82) = 6
		is_action(82) = 1
		victory_points(82) = 2
		
		names(83) = "Vineyard"
		potions(83) = 1
		victory_points(83) = 99
		
		names(84) = "Alchemist"
		costs(84) = 3
		potions(84) = 1
		is_action(84) = 1
		extra_actions(84) = 1
		
		names(85) = "Potion"
		costs(85) = 4
		gold(85) = 2.5
		never_buy(85) = 1
		
		names(86) = "Possession"
		costs(86) = 6
		potions(86) = 1
		is_action(86) = 1
		never_buy(86) = 1
		
		names(87) = "Herbalist"
		costs(87) = 2
		is_action(87) = 1
		extra_actions(87) = 1
		
		names(88) = "Phil's Stone"
		costs(88) = 3
		potions(88) = 1
		gold(88) = 4
		
		names(89) = "University"
		costs(89) = 2
		potions(89) = 1
		is_action(89) = 1
		extra_actions(89) = 1
		
		names(90) = "Scrying Pool"
		costs(90) = 2
		potions(90) = 1
		is_action(90) = 1
		is_attack(90) = 1
		
		names(91) = "Transmute"
		costs(91) = 0
		potions(91) = 1
		is_action(91) = 1
		
		names(92) = "Apothecary"
		costs(92) = 2
		potions(92) = 1
		is_action(92) = 1
		extra_actions(92) = 1
		
		names(93) = "Apprentice"
		costs(93) = 5
		is_action(93) = 1
		extra_actions(93) = 1
		never_buy(93) = 1
		
		names(94) = "Familiar"
		costs(94) = 3
		potions(94) = 1
		is_action(94) = 1
		extra_actions(94) = 1
		is_attack(94) = 1
		
		names(95) = "Golem"
		costs(95) = 4
		potions(95) = 1
		is_action(95) = 1
		
		names(96) = "Envoy"
		costs(96) = 4
		is_action(96) = 1
		
		For i = 0 To num_all_actions + 6
			original_costs(i) = costs(i)
			images(i) = System.Drawing.Image.FromFile(My.Application.Info.DirectoryPath & "/images/" & names(i) & ".jpg")
		Next i
	End Sub
End Module